package com.zttek.photosShareProject.modules.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author Y
 * @since 2017-09-04
 */
public class User extends Model<User> {

    private static final long serialVersionUID = 1L;

	@TableField("create_time")
	private Date createTime;
	@TableField("update_time")
	private Date updateTime;
	@TableField("delete_time")
	private Date deleteTime;
    /**
     * default 1, 0 for invalid
     */
	private Integer valid;
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
	private String account;
	private String password;
	private String username;
    /**
     * default 1, 0 for female
     */
	private Integer sex;
	@TableField("portrait_id")
	private Long portraitId;
    /**
     * 75 for chinese char length
     */
	private String hobbies;
	private Date birthday;
    /**
     * 100 for chinese char length
     */
	private String address;
	private String mobilephone;
	private String email;
	private String job;
    /**
     * default 1, 0 for ban
     */
	@TableField("is_share")
	private Integer isShare;
	@TableField("reset_password_token")
	private String resetPasswordToken;


	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Date getDeleteTime() {
		return deleteTime;
	}

	public void setDeleteTime(Date deleteTime) {
		this.deleteTime = deleteTime;
	}

	public Integer getValid() {
		return valid;
	}

	public void setValid(Integer valid) {
		this.valid = valid;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	public Long getPortraitId() {
		return portraitId;
	}

	public void setPortraitId(Long portraitId) {
		this.portraitId = portraitId;
	}

	public String getHobbies() {
		return hobbies;
	}

	public void setHobbies(String hobbies) {
		this.hobbies = hobbies;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getMobilephone() {
		return mobilephone;
	}

	public void setMobilephone(String mobilephone) {
		this.mobilephone = mobilephone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getJob() {
		return job;
	}

	public void setJob(String job) {
		this.job = job;
	}

	public Integer getIsShare() {
		return isShare;
	}

	public void setIsShare(Integer isShare) {
		this.isShare = isShare;
	}

	public String getResetPasswordToken() {
		return resetPasswordToken;
	}

	public void setResetPasswordToken(String resetPasswordToken) {
		this.resetPasswordToken = resetPasswordToken;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "User{" +
			"createTime=" + createTime +
			", updateTime=" + updateTime +
			", deleteTime=" + deleteTime +
			", valid=" + valid +
			", id=" + id +
			", account=" + account +
			", password=" + password +
			", username=" + username +
			", sex=" + sex +
			", portraitId=" + portraitId +
			", hobbies=" + hobbies +
			", birthday=" + birthday +
			", address=" + address +
			", mobilephone=" + mobilephone +
			", email=" + email +
			", job=" + job +
			", isShare=" + isShare +
			", resetPasswordToken=" + resetPasswordToken +
			"}";
	}
}
